<template>
	<a-config-provider
		:theme="{
			token: {
				colorPrimary: '#00b96b',
				borderRadius: 2,
			},
		}"
	>
		<NuxtLoadingIndicator />

		<NuxtLayout>
			<NuxtPage />
		</NuxtLayout>

		<UNotifications />
	</a-config-provider>
</template>

<script setup lang="ts">
import { useAuthStore } from '~/store/auth';

const colorMode = useColorMode();
const authStore = useAuthStore();

const color = computed(() => (colorMode.value === 'dark' ? '#111827' : 'white'));

useHead({
	meta: [
		{ charset: 'utf-8' },
		{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
		{ key: 'theme-color', name: 'theme-color', content: color },
	],
	link: [{ rel: 'icon', href: '/favicon.ico' }],
	htmlAttrs: {
		lang: 'zh-cn',
	},
});

useSeoMeta({
	titleTemplate: '随缘',
	ogImage: 'https://saas-template.nuxt.dev/social-card.png',
	twitterImage: 'https://saas-template.nuxt.dev/social-card.png',
	twitterCard: 'summary_large_image',
});

onMounted(() => {});
</script>
